<template>
  <div>
    <h2>{{obj}}{{ary}}</h2>
    <button @click='fn'>点击</button>
  </div>
</template>
<script>
// @ is an alias to /src
/* 
  vue中数组的七个变异方法
  pop push shift unshift  sort splice reverse

*/
export default {
  name: "XXX",
  data() {
    return {
      obj: {
        a: 123,
      },
      ary: [1, 2, 3, 4],
    };
  },
  methods: {
    fn() {
      // this.list = Object.freeze(data.data);
      // this.obj.a++;
      // this.obj.b = 1200;
      this.$set(this.ary, 1, 1200);
      console.log(this.$set);
      console.log(this.ary);
    },
  },
};
</script>
<style lang="less">
</style>